from public.tools import *
from public.action import *
from public.testDATE import *

from selenium.webdriver.common.keys import Keys
testCase="DBshop016_删除前台侧边设置"
MC="网站很好看"
firefox=openB(adminurl)
adminlogin(firefox)
menuu3(firefox,"商品管理","管理分类","前台侧边设置")
# 1.点击“删除”按钮，确定删除，删除成功。
firefox.find_element_by_xpath("//tr[contains(.,'%s')]/td[4]/a[2]" % MC).click()
firefox.switch_to.alert.accept()

time.sleep(2)
#断言
try:
    firefox.find_element_by_xpath("//tr[contains(.,'%s')]" % MC)
    writeLog("%s 测试失败"% testCase)
except:
    writeLog("%s 测试通过" % testCase)
    getPhoto(firefox)
firefox.quit()